<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('子库管理')" />
</head>
<body class="gray-bg">
     <div class="container-div" onmousemove="parent.updateTimeOut()">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								子库名称：<input type="text" name="subInventoryName"/>
							</li>
							<li>
								子库编码：<input type="text" name="subInventoryCode"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<!--<a class="btn btn-success" onclick="$.operate.add()">
					<i class="fa fa-plus"></i> 添加
				</a>-->
<!--				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:cellInfo:edit">-->
<!--					<i class="fa fa-edit"></i> 修改-->
<!--				</a>-->
<!--				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:cellInfo:remove">-->
<!--					<i class="fa fa-remove"></i> 删除-->
<!--				</a>-->
<!--				<a class="btn btn-warning" @click="synchronizedAccountAlias()">-->
<!--						<i class="fa fa-download"></i> 同步EBS账户别名-->
<!--				</a>-->
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('subInventory:edit')}]];
        var removeFlag = [[${@permission.hasPermi('subInventory:delete')}]];
        var prefix = ctx + "subInventory";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove/{id}",
				exportUrl: prefix + "/export",
                modalName: "子库管理",
		        showExport: true,
                columns: [
                // 		{
		        //     checkbox: true
		        // },
				{
					field : 'subInventoryName',
					title : '子库名称',
					visible: true
				},
				{
					field : 'subInventoryCode',
					title : '子库编码',
					sortable: true
				},
				{
					field : 'slotting',
					title : '货位Id',
					sortable: true
				},
					{
						field : 'organizationId',
						title : '库存组织ID',
						sortable: true
					},
				{
					field : 'updateTime',
					title : '修改时间',
					sortable: true
				},
				{
					field : 'updateUserName',
					title : '修改人',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.subInventoryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
		            	// if(row.subInventoryId !== 1){
                        // 	actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.subInventoryId + '\')"><i class="fa fa-remove"></i>删除</a>');
						// }
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
		var app = new Vue({
			el: '.container-div',
			data: {
				message: 'Hello Vue!',
			},
			methods: {
				// synchronizedAccountAlias:function(){
				// 	$.modal.confirm("确定同步吗？",function(){
				// 		$.operate.get("/accountAlias/synchronizedAccountAlias");
				// 	});
				// }
			},
			created: function () {
			},
		})

    </script>
</body>
</html>










